package se.appening;

import java.io.IOException;
import java.net.ServerSocket;
import java.net.Socket;

public class ServerApplication {
	private static ServerSocket serverSocket;

	public static void openListener(int port){
		try {
			serverSocket = new ServerSocket(port, 15);
		} catch (IOException e) {
			e.printStackTrace();
		}
	}
	
	public static void main(String[] args) throws IOException {
		openListener(2665);
		while (true){
			Socket socket = serverSocket.accept();
			ClientCaretaker socketEndpoint = new ClientCaretaker(socket);
			socketEndpoint.start();
		}
	}
}
